package com.zhu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zhu.domain.Warehouse;
import com.zhu.model.warehouse.WarehouseSelectVM;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author JoyBoy
 * @since 2022-06-02
 */
public interface WarehouseService extends IService<Warehouse> {
    /**
     * 功能描述 添加仓库
     * @author JoyBoyZH
     * @date 2022/6/6
     * @param warehouse
     * @return boolean
     */
    boolean saveWarehouse(Warehouse warehouse);

    /** 通过id删除仓库
     * 功能描述
     * @author JoyBoyZH
     * @date 2022/6/7
     * @param warehouseId
     * @return boolean
     */
    boolean deleteWarehouse(Integer warehouseId);
    /**
     * 功能描述 获取所有仓库
     * @author JoyBoyZH
     * @date 2022/6/6
     * @param
     * @return java.util.List<com.zhu.domain.Warehouse>
     */
    List<Warehouse> getAllWarehouses();

    /**
     * 功能描述 通过仓库名查找仓库
     * @author JoyBoyZH
     * @date 2022/6/6
     * @param warehouseName
     * @return com.zhu.domain.Warehouse
     */
    Warehouse getByName(String warehouseName);

    /**
     * 功能描述 通过id与名字模糊查询
     * @author JoyBoyZH
     * @date 2022/6/10
     * @param model
     * @return com.zhu.domain.Warehouse
     */
    List<Warehouse> getByDim(WarehouseSelectVM model);

    /**
     * 功能描述 通过仓库id查找仓库
     * @author JoyBoyZH
     * @date 2022/6/6
     * @param warehouseId
     * @return com.zhu.domain.Warehouse
     */
    Warehouse getByWarehouseId(Integer warehouseId);

    /**
     * 功能描述 修改仓库信息
     * @author JoyBoyZH
     * @date 2022/6/6
     * @param warehouse
     * @return boolean
     */
    boolean updateWarehouse(Warehouse warehouse);
}
